package com.ship.boats.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ship.boats.domain.SpBoatsVoyageMessage;
import com.ship.boats.domain.dto.QueryBoatsVoyageRq;
import com.ship.boats.domain.vo.QueryBoatsVoyageMessageInfo;
import com.ship.boats.domain.vo.QueryDeliverCountryInfo;
import com.ship.boats.domain.vo.QueryVolumeTradeIfo;
import com.ship.boats.domain.vo.QueryVoyageTradeInfo;
import com.ship.common.datasource.annotation.Slave;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface BoatsVoyageMessageMapper extends BaseMapper<SpBoatsVoyageMessage> {
    List<QueryBoatsVoyageMessageInfo> queryBoatsVoyageList(@Param("query") QueryBoatsVoyageRq query);

    List<String> queryloadPortList(@Param("countryNameList") List<String> countryNameList);

    List<String> queryDischargePort(@Param("countryNameList") List<String> countryNameList);

    List<QueryDeliverCountryInfo> queryDeliverCountryList(@Param("query") QueryBoatsVoyageRq query,@Param("countryName") String countryName);

    List<QueryDeliverCountryInfo> queryLoadCountryList(@Param("query") QueryBoatsVoyageRq query);

    List<QueryDeliverCountryInfo> queryReceiveCargoCount(@Param("query") QueryBoatsVoyageRq query,@Param("countryName") String countryName);

    List<QueryDeliverCountryInfo> queryDischargeCountryList(@Param("query") QueryBoatsVoyageRq query);

    List<QueryVolumeTradeIfo> queryVolumeTrade(@Param("query") QueryBoatsVoyageRq query);

    List<QueryVoyageTradeInfo> queryExportVolume(@Param("query") QueryBoatsVoyageRq query);

    List<QueryVoyageTradeInfo> queryImportVolume(@Param("query") QueryBoatsVoyageRq query);

    List<QueryVoyageTradeInfo> queryExportVolumeMonth(@Param("query") QueryBoatsVoyageRq query);

    List<QueryVoyageTradeInfo> queryImportVolumeMonth(@Param("query") QueryBoatsVoyageRq query);

    void deleteVoyageMessage(@Param("startDate") String startDate,@Param("endDate") String endDate);

    List<QueryDeliverCountryInfo> countLoadCountryList(@Param("query") QueryBoatsVoyageRq query);

    List<QueryDeliverCountryInfo> countDischargeCountryList(@Param("query") QueryBoatsVoyageRq query);

    @Slave
    List<String> queryShipNameList();

    @Slave
    List<String> queryImoListByShipName(@Param("shipNameList") List<String> shipNameList);

}
